import http from "@/api";

// * 创建权限
export const grantPermissionsToRole = (roleId: number | null, permissionIds: any[], menuIds: any[]) => {
	return http.post({
		url: `/rolePermission/grantPermissionsToRole`,
		data: {
			roleId,
			permissionIds,
			menuIds
		}
	});
};

// * 获取角色权限
export const findRolePermissions = (roleId: number | null) => {
	return http.get({
		url: `/rolePermission/findRolePermissionsMenus/${roleId}`
	});
};
